# -*- coding:utf-8 -*-
"""
@author:Levy
@file:Teacher.py
@time:2018/2/11 001114:58
"""


class Teacher(object):
    def __init__(self, name=None, gender=None):
        self.__name = name
        self.__gender = gender

    def get_gender(self):
        return self.__gender

    def set_gender(self, gender):
        # if gender != 'male' or gender != 'female':
        #     ValueError('bad gender')
        # else:
        #     self.__gender = gender
        if gender == 'female' or gender == 'male':
            self.__gender = gender
        else:
            ValueError('invalid input')


bart = Teacher('Bart', 'femaless')
print(bart.set_gender('femalesrew'))
